<?php echo $this->render('include/header.phtml');?>

<!--main begin//-->
<DIV id=main>
    <DIV class=conversation-group>
        <H2><?php echo $this->from.' - '.$this->to;?><span class="icon_event_tiny"><a href="/event/add">添加一个活动？</a></span></H2>
        <UL class=conversations>
<?php
foreach ($this->res as $event)
{
    $attend = false;
    foreach ($this->mine as $my)
    {
        if ($event['id'] == $my['id'])
        {
            $attend = true;
        }
    }
?>
            <LI class=conversation>
                <A title="Waggoner Reunion" href="http://famspam.com/demo/conversations/188"><IMG class=headshot alt=Mom src="/images/momhi.jpg"></A> 
                <P class="reply-count ">2个参与者</P>
                <DIV class=cbody>
                    <H3><A href="#"><?php echo $event['who'];?></A></H3>
                    <SPAN class=meta><?php echo $event['eventTime']?></SPAN> 
                    <P class=excerpt><?php echo $event['description'];?></P>
                    <UL class=replies>
<?php
if ($attend)
{
?>
                        <LI><A title="退出这个活动" href="/event/quit/event/<?php echo $event['id'];?>">不，我不会参加这个活动.</A></LI>
<?php
}
else
{
?>
                        <LI><A title="参加这个活动" href="/event/attend/event/<?php echo $event['id'];?>">是的，这正是我要参加的!</A></LI>
<?php
}
?>
                    </UL>
                </DIV>
            </LI>
<?php
}
?>

        </UL>
    </DIV>
</DIV>
<!--main end//-->

<?php echo $this->render('include/footer.phtml');?>
